.class public Lcom/instagram/android/directshare/j/a;
.super Ljava/lang/Object;
.source "ClearInboxNewCountUtil.java"


# static fields
.field private static final a:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

.field private static b:Lcom/instagram/android/directshare/j/a;


# instance fields
.field private c:Lcom/instagram/android/d/k/u;

.field private d:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Long;",
            "Lcom/instagram/android/directshare/b/a/d;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 21
    const-class v0, Lcom/instagram/android/directshare/j/a;

    sput-object v0, Lcom/instagram/android/directshare/j/a;->a:Ljava/lang/Class;

    return-void
.end method

.method private constructor <init>()V
    .locals 1

    .prologue
    .line 39
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 40
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/j/a;->d:Ljava/util/HashMap;

    .line 41
    new-instance v0, Lcom/instagram/android/d/k/w;

    invoke-direct {v0}, Lcom/instagram/android/d/k/w;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/j/a;->c:Lcom/instagram/android/d/k/u;

    .line 42
    return-void
.end method

.method public static a()Lcom/instagram/android/directshare/j/a;
    .locals 1

    .prologue
    .line 28
    sget-object v0, Lcom/instagram/android/directshare/j/a;->b:Lcom/instagram/android/directshare/j/a;

    if-nez v0, :cond_0

    .line 29
    invoke-static {}, Lcom/instagram/android/directshare/j/a;->c()V

    .line 31
    :cond_0
    sget-object v0, Lcom/instagram/android/directshare/j/a;->b:Lcom/instagram/android/directshare/j/a;

    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/directshare/j/a;)Ljava/util/HashMap;
    .locals 1
    .parameter

    .prologue
    .line 19
    iget-object v0, p0, Lcom/instagram/android/directshare/j/a;->d:Ljava/util/HashMap;

    return-object v0
.end method

.method private a(J)V
    .locals 5
    .parameter

    .prologue
    const/4 v2, 0x1

    const/4 v4, 0x0

    .line 53
    iget-object v0, p0, Lcom/instagram/android/directshare/j/a;->d:Ljava/util/HashMap;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 54
    sget-object v0, Lcom/instagram/android/directshare/j/a;->a:Ljava/lang/Class;

    const-string v1, "Will make a request for %s"

    new-array v2, v2, [Ljava/lang/Object;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    aput-object v3, v2, v4

    invoke-static {v1, v2}, Lcom/facebook/c/i/b;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/Class;Ljava/lang/String;)V

    .line 56
    iget-object v0, p0, Lcom/instagram/android/directshare/j/a;->c:Lcom/instagram/android/d/k/u;

    new-instance v1, Lcom/instagram/android/directshare/b/a/d;

    invoke-direct {v1, p1, p2}, Lcom/instagram/android/directshare/b/a/d;-><init>(J)V

    new-instance v2, Lcom/instagram/android/directshare/j/b;

    invoke-direct {v2, p0, p1, p2}, Lcom/instagram/android/directshare/j/b;-><init>(Lcom/instagram/android/directshare/j/a;J)V

    invoke-interface {v0, v1, v2}, Lcom/instagram/android/d/k/u;->a(Lcom/instagram/android/d/k/d;Lcom/instagram/android/d/k/f;)V

    .line 62
    :goto_0
    return-void

    .line 59
    :cond_0
    sget-object v0, Lcom/instagram/android/directshare/j/a;->a:Ljava/lang/Class;

    const-string v1, "Won\'t make a request for %s, there is already one"

    new-array v2, v2, [Ljava/lang/Object;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    aput-object v3, v2, v4

    invoke-static {v1, v2}, Lcom/facebook/c/i/b;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/Class;Ljava/lang/String;)V

    goto :goto_0
.end method

.method private static declared-synchronized c()V
    .locals 2

    .prologue
    .line 35
    const-class v1, Lcom/instagram/android/directshare/j/a;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/instagram/android/directshare/j/a;->b:Lcom/instagram/android/directshare/j/a;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 37
    :goto_0
    monitor-exit v1

    return-void

    .line 36
    :cond_0
    :try_start_1
    new-instance v0, Lcom/instagram/android/directshare/j/a;

    invoke-direct {v0}, Lcom/instagram/android/directshare/j/a;-><init>()V

    sput-object v0, Lcom/instagram/android/directshare/j/a;->b:Lcom/instagram/android/directshare/j/a;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 35
    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public b()V
    .locals 2

    .prologue
    .line 45
    invoke-static {}, Lcom/instagram/android/util/ai;->a()Lcom/instagram/android/util/ai;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/util/ai;->b()V

    .line 46
    invoke-static {}, Lcom/instagram/android/directshare/j/c;->c()I

    move-result v0

    if-lez v0, :cond_0

    .line 47
    sget-object v0, Lcom/instagram/android/directshare/j/a;->a:Ljava/lang/Class;

    const-string v1, "There are unread items, need to clear"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/Class;Ljava/lang/String;)V

    .line 48
    invoke-static {}, Lcom/instagram/android/directshare/j/c;->b()J

    move-result-wide v0

    invoke-direct {p0, v0, v1}, Lcom/instagram/android/directshare/j/a;->a(J)V

    .line 50
    :cond_0
    return-void
.end method
